package com.winit.tag.repository;

import com.winit.common.BaseRepository;
import com.winit.tag.model.ConfigTag;
import org.springframework.data.cassandra.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by wangjian on 17/9/8.
 */
@Repository
public interface ConfigTagRepository extends BaseRepository<ConfigTag, String> {
    @Query("select * from uconfig_tag where tag_code = ?0")
    List<ConfigTag> findByTag_group_code(String groupCode);

    @Query("select tag_code from uconfig_tag where tag_group_code = ?0")
    List<String> getTagCodesForGroup(String tag_group_code);
}
